//轿车类
public class Car extends Vehicle {
	//属性  型号
	
	private String type;
	
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Car() {
		super();
	}

	public Car(String brand, String vehicleID, int perRent, String type) {
		super(brand, vehicleID, perRent);
		this.type = type;
	}

	@Override
	public float calcRent(int days) {
		float price=getPerRent()*days;
		if(days>7 && days<=30) {
			price*=0.9f;
		}else if(days>30 && days<=150) {
			price*=0.8f;
		}else if(days>150){
			price*=0.7f;
		}
		return price;
	}

	@Override
	public String toString() {
		return super.toString()+"，型号是：" + type;
	}
}
